package com.zenglx.multilanguage.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.zenglx.multilanguage.interceptor.ZlxMultiLanguageInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author bo5.zeng
 * @Descripition： Mybatis-plus配置
 * @date 2023/4/14 15:29
 */
@Configuration
@MapperScan("com.zenglx.multilanguage.mapper")
public class CustomMybatisConfig {
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new ZlxMultiLanguageInterceptor());
        return interceptor;
    }
}
